package cn.edu.scau.cmi.shishuai.exercise6;

abstract class AAA{
	abstract int sum(int x, int y);
	int sub(int x, int y) {
		return x - y;
	}
}

class BBB extends AAA{
	int sum(int x, int y) {
		return x + y;
	}
}

public class Example6_9 {
	public static void main(String[] args) {
		BBB b = new BBB();
		int sum = b.sum(30, 20);
		int sub = b.sub(30, 20);
		System.out.println("sum = "+sum);
		System.out.println("sub = "+sub);
	}

}
